﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

public partial class ThongKe_Mster_TuNhan : System.Web.UI.MasterPage
{
    BieumauDataContext db = new BieumauDataContext();
    string path = "";
    public static int lock_flag;
    string maDonVi = "";
    protected void Page_Load(object sender, EventArgs e)
    {

        //lấy tên trang hiện tại :vd Thongke.aspx
            path = Path.GetFileName(Request.Url.AbsolutePath);
            // kiểm tra session
         maDonVi = Request.QueryString["id"].ToString().Trim();
        if (!IsPostBack)
        {
            

                drop_dn.Items.Clear();
                drop_dn.Items.Add("Chọn 1 phụ lục ");
                for (int i = 1; i <= 8; i++)
                {
                    drop_dn.Items.Add("Phụ lục " + i.ToString("D2"));
                }
            
        }


    }



    protected void drop_dn_SelectedIndexChanged(object sender, EventArgs e)
    {
         int nambc =Convert.ToInt32( Request.QueryString["nam"].ToString().Trim());
         Response.Redirect("frmPhuLuc" + drop_dn.SelectedItem.ToString().Substring(drop_dn.SelectedItem.ToString().Length - 2, 2) + ".aspx?id=" + maDonVi+"&nam="+nambc);
         
    }
}
